let express = require('express') // express框架
let router = express.Router()
let mysql = require('mysql')
let dbConfig = require('../db')


var connection = mysql.createConnection(dbConfig)
connection.connect()

router.get('/deleteSubgoodslist', (req, res) => {
  var parms = [req.query.id]
  var sql = `delete from goodssubmit where id=?`
  console.log("a",parms[0])
  connection.query(sql,parms, function (err, result) {
    if (err) {
      console.log(err)
    }
    if (result) {
      console.log(result)
      res.send(result) 
    }
    // connection.end()
  })
})



module.exports = router